/* Variables for reusable values */
:root {
  --primary-color: #124e84;
  --text-dark: #212121;
  --text-muted: #797979;
  --table-bg-even: #f9f9f9;
  --table-bg-hover: #f3f3f3;
  --border-color: #ddd;
}

/* Base styles */
h1 {
  color: var(--text-dark);
}

h1::after {
  background: #1b76c7;
  bottom: 10px;
  display: block;
  content: "";
  height: 1px;
  margin: 5px auto 10px auto;
  width: 100%;
}

* {
  box-sizing: border-box;
}

.column {
  float: left;
  padding: 0 5px;
}

.left {
  width: 50%;
}

.right {
  width: 50%;
}

.row:after {
  content: "";
  display: table;
  clear: both;
}

body {
  background-image: url("https://jbu_ftp.sidearmsports.com/custompages/css/gameday/background-blue-repeat.jpg");
  background-repeat: repeat;
  background-color: #eeef0;
}

/* Table base styles (applies to all tables) */
table {
  border-collapse: collapse;
  width: 100%;
  margin-top: 20px;
}

th,
td {
  padding: 8px 10px;
  text-align: left;
  vertical-align: middle;
}

th {
  background-color: var(--primary-color);
  color: white;
}

tr:nth-child(even) {
  background-color: var(--table-bg-even);
}

tbody tr {
  border-bottom: 1px solid var(--border-color);
  transition: background-color 0.2s ease-in-out;
}

tbody tr:hover {
  background-color: var(--table-bg-hover);
}

thead,
tbody {
  font-size: 12px;
}

:target {
  scroll-margin-top: 150px;
}

/* Section headings */
h4 {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 30px 0 -15px;
  color: var(--primary-color);
}

.header-title {
  font-weight: bold;
}

.min-games {
  font-size: 0.8em;
  color: var(--text-muted);
  font-style: italic;
  font-weight: normal;
}

.special-note {
  font-size: 0.8em;
  color: var(--text-muted);
  font-style: italic;
  padding-top: 5px;
}

/* Desktop layout (originally for 4-col tables; still fine here) */
@media (min-width: 769px) {
  table {
    table-layout: fixed;
  }

  th:nth-child(1),
  td:nth-child(1) {
    width: 15%;
  }

  th:nth-child(2),
  td:nth-child(2) {
    width: 15%;
  }

  th:nth-child(3),
  td:nth-child(3) {
    width: 20%;
  }

  th:nth-child(4),
  td:nth-child(4) {
    width: 15%;
  }

  th:nth-child(5),
  td:nth-child(5) {
    width: 15%;
  }

  th:nth-child(6),
  td:nth-child(6) {
    width: 20%;
  }
}

/* Tablet and mobile (generic horizontal behavior) */
@media (max-width: 768px) {
  table {
    white-space: nowrap;
    width: 100%;
  }

  .extra-wide {
    display: block;
    overflow-x: auto;
  }

  .min-games {
    display: block;
    margin-top: 2px;
  }
}

/* Small mobile tweaks */
@media (max-width: 480px) {

  th,
  td {
    padding: 8px;
  }

  .column {
    width: 100%;
    padding: 0;
  }
}

/* ---- Status Dot Indicators ---- */
.status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
}

.status-dot.win {
  background: #30cf89;
}

.status-dot.loss {
  background: #f81c30;
}

.status-dot.draw {
  background: #c7c7c7;
}

/* Footer legend */
.footer-legend {
  margin-top: 12px;
  font-size: 14px;
  display: flex;
  justify-content: center;
  gap: 24px;
}

.footer-legend span {
  display: inline-flex;
  align-items: center;
}

/* ---- Mobile: stack tables that use data-label ---- */
@media (max-width: 700px) {

  table,
  table thead,
  table tbody,
  table th,
  table td,
  table tr {
    display: block;
    width: 100%;
  }

  table thead {
    display: none;
  }

  table tbody tr {
    background: #ffffff;
    margin-bottom: 16px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    overflow: hidden;
  }

  table td {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 12px 16px 12px 42%;
    border-bottom: 1px solid var(--border-color);
    text-align: right;
    background: #ffffff;
    box-sizing: border-box;
  }

  table td:last-child {
    border-bottom: none;
  }

  table td::before {
    content: attr(data-label);
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 40%;
    display: flex;
    align-items: center;
    padding: 0 12px;
    font-weight: 600;
    background: #f7f7f7;
    border-right: 1px solid var(--border-color);
    text-align: left;
    box-sizing: border-box;
  }
}